package com.chukun.multi.pipeline.reusable;

public class PipeException extends Exception {

    /**
     * 抛出异常的pipe实例
     */
    public final Pipe<?,?> sourcePipe;

    /**
     * 抛出异常的pipe实例在抛出异常时所处理的输入元素
     */
    public final Object input;

    public PipeException(Pipe<?,?> sourcePipe,Object input,String message) {
        super(message);
        this.sourcePipe = sourcePipe;
        this.input = input;
    }

    public PipeException(Pipe<?,?> sourcePipe,Object input,String message,Throwable cause) {
        super(message,cause);
        this.sourcePipe = sourcePipe;
        this.input = input;
    }

}
